package com.dgut.Config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@Getter
@Setter
public class AppProperties {

    private Jwt jwt = new Jwt();

    @Getter
    @Setter
    public static class Jwt {
        private String header = "Authorization";    // HTTP 报头的认证字段key
        private String prefix = "Bearer";   // HTTP报头的认证字段的值的前缀
        private long accessTokenExpireTime = 10 * 3600 * 1000L; // Access Token过期时间：10小时
        //private long accessTokenExpireTime = 3 * 1000L; // Access Token过期时间：10秒
        private long refreshTokenExpireTime = 30 * 24 * 3600 * 1000L;   //Refresh Token过期时间：30天
        private String key = "aIfUCibc0g/O+XD87wq8ktBp/eHezThnLNqiT3kVT2DKku8q7B/tmEhVYvNZsDtVqwy8arMha1CrLljqx45VGA=="; //用于签名Access Token
        private String refreshKey = "HxhUyD9+h/muw6z3QjL7hqv+odR1aRP2wNhUByWgaM7xxNPmzgjmmvZo8OLmMdgtCTu4nALkrTTnY8NXDNuj2w==";  //用于签名Refresh Token
    }

}
